package com.xbongbong.paas.pojo;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 * 导入excel状态返回类
 *
 * @author zheng.li
 * @version v1.0
 * @date 2019/5/13 9:56
 * @since v1.0
 */
@Setter
@Getter
@ToString
public class ImportStatusPojo {

    /**
     * excel总行数
     */
    Integer totalNum = 0;
    /**
     * 成功总数
     */
    Integer successNum = 0;
    /**
     * 错误数
     */
    Integer errorNum = 0;
    /**
     * 需覆盖数
     */
    Integer updateNum = 0;
    /**
     * 无签订人数（合同）
     */
    Integer noSignNum = 0;
    /**
     * 是否导入完成
     */
    Boolean finish = false;
    /**
     * 应用id
     */
    private Long appId;
    /**
     * formId
     */
    private Long formId;
    /**
     * 菜单id
     */
    private Long menuId;
    /**
     * saas标志
     */
    private Integer saasMark;
    /**
     * 业务类型
     */
    private Integer businessType;
    /**
     * 分片数量
     */
    private Integer fragmentationNum;

    private List<String> attrList;

    /**
     * 错误码
     */
    private Integer code = 0;
    /**
     * 错误信息
     */
    private String msg = "";

    /**
     * 是否在导入中
     */
    private Boolean isImport;

    public ImportStatusPojo() {}

    public ImportStatusPojo(Integer totalNum, Integer successNum, Integer errorNum, Integer updateNum, Integer noSignNum, Boolean finish, List<String> attrList) {
        this.totalNum = totalNum;
        this.successNum = successNum;
        this.errorNum = errorNum;
        this.updateNum = updateNum;
        this.noSignNum = noSignNum;
        this.finish = finish;
        this.attrList = attrList;
    }

    public ImportStatusPojo(Integer totalNum, Integer successNum, Integer errorNum, Integer updateNum, Integer noSignNum, Boolean finish, Integer fragmentationNum, List<String> attrList) {
        this.totalNum = totalNum;
        this.successNum = successNum;
        this.errorNum = errorNum;
        this.updateNum = updateNum;
        this.noSignNum = noSignNum;
        this.finish = finish;
        this.fragmentationNum = fragmentationNum;
        this.attrList = attrList;
    }
}
